package com.wangsd.common.task;


import com.wangsd.web.face.service.TOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MyTask {

    @Autowired
    TOrderService orderService;
    //每天晚上1点执行分账查询和分账操作
    @Scheduled(fixedRate = 3600000)//一小时执行一次
    //@Scheduled(cron = "00 00 01 ? * *")
    public void BankCardScheduler() {
        log.info("#########查询分账结果，执行分账开始#########");
        orderService.doPaymentQueryAndPayment();
        log.info("#########查询分账结果，执行分账结束#########");
    }
}
